package com.hua.springCloud.service;

import com.hua.springCloud.mapper.StorageMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StorageServiceImpl implements StorageService{
    private static final Logger LOGGER = LoggerFactory.getLogger(StorageServiceImpl.class);
    @Autowired
    private StorageMapper storageMapper;
    @Override
    public void reduceCount(Long productId, Integer count) {
        System.out.println(1);
        System.out.println(count);
        LOGGER.info("------->storage-service中扣减库存开始");
        storageMapper.reduceCount(productId,count);
        LOGGER.info("------->storage-service中扣减库存结束");
    }
}
